package cn.yht.wang.controller;


import cn.yht.wang.bean.SysRole;
import cn.yht.wang.bean.SysUser;
import cn.yht.wang.common.ApiResult;
import cn.yht.wang.mapper.RoleMapper;
import cn.yht.wang.mapper.UserMapper;
import cn.yht.wang.utils.JWTUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Hello world!
 *
 */
@Api(tags = "用户接口")
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    RoleMapper roleMapper;

    @GetMapping(value="/{roleId}")
    public ApiResult<SysRole> getByUserId(@PathVariable("roleId") Long roleId){
        SysRole user = roleMapper.selectById(roleId);
        return new ApiResult<>("0000", "查询成功.", user);
    }
}
